﻿@using HelpDeskTicketingApp.Models
@model AdmUsersViewModel
@{
    ViewBag.Title = "Index";
}
<div class="container">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <h2>Technicians</h2>
            <table class="table table-striped table-bordered">
                <tr>
                    <th>Name</th>
                    <th>Email</th>
                    <th>Username</th>        
                    <th></th>
                    <th></th>
                    <th></th>
                </tr>

                @foreach (var u in Model.Users)
                {
                    <tr>
                        <td>@(u.FirstName + " " + u.LastName)</td>
                        <td>@u.Email</td>
                        <td>@u.UserName</td>
                        <td>@(Html.ActionLink("View Tickets", "Technician", new { userId = u.UserId }))</td>
                        <td>@(Html.ActionLink("Delete Tech", "DeleteTech", new { userId = u.UserId }))</td>
                        <td>@(Html.ActionLink("Edit Tech", "AddUpdateTech", new { userId = u.UserId }))</td>
                    </tr>

                }

            </table>
          
            @(Html.ActionLink("Add User", "AddUpdateTech", null, new {@class = "btn btn-info"}))
          
            
            @(Html.ActionLink("See All Tickets", "Tickets", null, new {@class = "btn btn-info"}))
      
        </div>

    </div>

</div>